package com.example.christina.controller;


import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import com.example.christina.tools.robot;

@RestController
@RequestMapping(value = "talk")
public class TalkController {
    @PostMapping(path = "robot")
    public List<?> response(@RequestBody String request)
    {
        List<String> res = new ArrayList<>();
        try {
            String tempRes = robot.get(request);
            res.add(tempRes);
        } catch (IOException e) {
            e.printStackTrace();
        }

        return res;
    }
}
